<template>
	<view class="detail-page">
		<view class="box flexr flexcc">
			<view class="title">项目类型：</view>
			<view class="flex-flex">{{range[info.des].text}}</view>
		</view>
		<view class="box flexr flexcc">
			<view class="title">开发时间：</view>
			<view class="flex-flex">{{info.date}}</view>
		</view>
		<view class="box flexr flexcc" v-for="(val,k) in obj" :key="k">
			<view class="title">{{val}}：</view>
			<view class="flex-flex" >{{info[k]}}</view>
			
		</view>
		<view class="box " >
			<view class="title">效果图：</view>
			
			<view class="flex-flex w">
				<image :src="item.url" class="img" mode="widthFix" v-for="(item,index) in info.imgList" :key="index"></image>
			</view>
		</view>
	</view>
</template>

<script>
import { computed, defineComponent, reactive, toRefs } from "vue"
import { useMainStore } from "../../store"
	export default defineComponent({
		setup(){
			const store = useMainStore()
			const data = reactive({
				info:computed(()=>store.info),
				obj:{
					des:'项目类型',
					date:'开发日期',
					skill:'技术栈',
					introduce:'项目描述',
				
				},
				range: [
					{ value: 0, text: '小程序' },
					{ value: 1, text: '移动端' },
					{ value: 2, text: 'pc端' },
					{ value: 3, text: 'app' }
				],
			})
			if(Object.keys(store.info).length>0){
				uni.setNavigationBarTitle({
					title:store.info.title
				})
			}
			return{
				...toRefs(data)
			}
		}
	})
</script>

<style lang="scss" >
	page{
		height: 100%;
	}
	.detail-page{
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		padding: 20upx;
		overflow: auto;
		background-color: #f4f4f4;
		.box{
			margin-bottom: 10upx;
			font-size: 30upx;
			
		}
		.title{
			min-width: 130upx;
		}
		.w{
			width: 100%;
			height: 100%;
		}
		.img{
			width: 100%;
			margin-top: 40upx;
		}
	}

</style>
